package com.c6906.vdam.dps.iotdb;

import org.apache.iotdb.session.pool.SessionPool;

/**
 * @Author : TAOHUIQI
 * @Date: 2024/6/16 16:16
 * @Description:
 */
public class IotDBConfig {

    //local
//    private static final String IOTDB_HOST = "116.163.35.114";
    //dev环境
//    private static final String IOTDB_HOST = "192.168.0.109";
    //uat环境
//    private static final String IOTDB_HOST = "192.168.0.16";
    //prd环境
    private static final String IOTDB_HOST = "10.48.28.135";
    private static final int IOTDB_PORT = 6667;
    private static final String IOTDB_USERNAME = "root";
    private static final String IOTDB_PASSWORD = "changsha20240501!";

    private static SessionPool sessionPool = null;

    static {
        sessionPool =
                new SessionPool.Builder()
                        .host(IOTDB_HOST)
                        .port(IOTDB_PORT)
                        .user(IOTDB_USERNAME)
                        .password(IOTDB_PASSWORD)
                        .maxSize(50)
                        .build();
    }

    public static SessionPool getConnection() {
        return sessionPool;
    }
}
